<?php

namespace App\Models\Traits;

trait GoldCoinsTrait
{
	public static function allowedLowestTransferCoins()
	{
		return big_decimal(cs('storm')->allowed_lowest_transfer_gold_coins);
	}
	
	public static function isLowestTransferCoinsMatched($coins)
	{
		$allowedLowestCoins = self::allowedLowestTransferCoins();
		if ($allowedLowestCoins->isGreaterThan(0)) {
			return big_decimal($coins)->isGreaterThanOrEqualTo($allowedLowestCoins);
		}
		return true;
	}
}
